|
1
|
|
|
/** global: marks */ |
|
2
|
|
|
/* global marks */ |
|
3
|
|
|
/** global marks */ |
|
4
|
|
|
/* |
|
5
|
|
|
******************************************************************************* |
|
6
|
|
|
* Copyright 2011-2017 DANTE Ltd. and GÉANT on behalf of the GN3, GN3+, GN4-1 |
|
7
|
|
|
* and GN4-2 consortia |
|
8
|
|
|
* |
|
9
|
|
|
* License: see the web/copyright.php file in the file structure |
|
10
|
|
|
******************************************************************************* |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
/* General function for doing HTTP XML GET requests. */ |
|
14
|
|
|
|
|
15
|
|
|
function getXML(attribute_class) { |
|
16
|
|
|
var client = new XMLHttpRequest(); |
|
17
|
|
|
client.attribute_class = attribute_class; |
|
18
|
|
|
client.onreadystatechange = addOption; |
|
19
|
|
|
client.open("GET", "inc/option_xhr.inc.php?class=" + attribute_class + "&etype=XML"); |
|
20
|
|
|
client.send(); |
|
21
|
|
|
} |
|
22
|
|
|
|
|
23
|
|
|
function addOption() { |
|
24
|
|
|
if (this.readyState === 4 && this.status === 200) { |
|
25
|
|
|
var field = document.getElementById("expandable_" + this.attribute_class + "_options"); |
|
26
|
|
|
var div = document.createElement('tbody'); |
|
27
|
|
|
div.innerHTML = this.responseText; |
|
28
|
|
|
field.appendChild(div.firstChild); |
|
29
|
|
|
} |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
function processCredentials() { |
|
33
|
|
|
if (this.readyState === 4 && this.status === 200) { |
|
34
|
|
|
var field = document.getElementById("disposable_credential_container"); |
|
35
|
|
|
field.innerHTML = this.responseText; |
|
36
|
|
|
} |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
function doCredentialCheck(form) { |
|
40
|
|
|
postXML(processCredentials, form); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
function deleteOption(identifier) { |
|
44
|
|
|
var field = document.getElementById(identifier); |
|
45
|
|
|
field.parentNode.removeChild(field); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
function MapGoogleDeleteCoord(e) { |
|
49
|
|
|
marks[e - 1].setOptions({visible: false}); |
|
50
|
|
|
} |